package com.zysstudy.studysyntax;

/**
 * @author zhaoyoushui
 * @date 2023/9/1 11:09
 */
public class Person {

    public String name;

    public int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    @Override
    public boolean equals(Object o) {
        if (o instanceof Person) {
            Person p = (Person) o;
            return this.name.equals(p.name) && this.age == p.age;
        }
        return false;
    }
}
